1. Field of the Invention
The present invention relates to a wireless communication terminal and a wireless communication method.
Priority is claimed on Japanese Patent Application No. 2005-285227, filed Sep. 29, 2005, the content of which is incorporated herein by reference.
2. Description of Related Art
A wireless communication terminal such as a mobile telephone including a function of communicating data with a server connected to a network generally establishes communication with the server by the following processing procedure. When the wireless communication terminal receives a command to start data communication with the server from a user (actually, when the user presses a special key for starting data communication on the wireless communication terminal), it starts a point to point protocol (PPP) connection process and obtains an internet protocol (IP) address from a service provider. After establishing the PPP connection, in order to establish a transmission control protocol (TCP) connection with the server, the wireless communication terminal selects a predetermined port number from among a plurality of port numbers for data communication allocated to it as a communication port number (i.e. it uses a socket which combines the IP address with the communication port number as its own network address) and transmits a synchronize (SYN) packet to the server. A predetermined socket for data communication is, of course, allocated to the server side.
The server receives the SYN packet and, if capable of communication connection, transmits a SYN/ACK (acknowledgment) packet to the wireless communication terminal. When the wireless communication terminal receives the SYN/ACK packet, it transmits an ACK packet to the server. This establishes a TCP connection between the wireless communication terminal and the server For example, numbers from 1024 to 65536 are determined as port numbers which can be used by a mobile telephone, and the mobile telephone establishes a communication connection with the server by setting an arbitrary communication port number within this range. The port number on the server side depends on the service protocol being used. For example, port number 80 is set for a hyper text transfer protocol (HTTP).
When the wireless communication terminal enters a non-communicable state during the above data communication and the user inputs a command to end data communication, the wireless communication terminal shifts to a TCP disconnection state. However, since the wireless communication terminal is in a non-communicable state, the TCP disconnection message it generates does not reach the server, and the TCP connection established on the server side continues. If the user inputs a command to restart data communication after the wireless communication terminal returns to a communicable state, the wireless communication terminal retransmits the SYN packet to the server using the same communication port number as before. However, since a TCP connection using the above communication port number is already established on the server side, the TCP connection state on the wireless communication terminal side does not match that on the server side. In this case, the server determines that there is an error in the communication port number on the wireless communication terminal side, and transmits a reset (RST) packet to the wireless communication terminal.
When the wireless communication terminal receives the PST packet, it disconnects the TCP connection and then disconnects the PPP connection. After disconnecting the PPP, the wireless communication terminal displays an error message on a self-contained display unit such as a liquid crystal panel, thereby notifying the user that a communication connection error with the server has occurred. The user confirms the error message and determines whether to reconnect. If the user inputs a command to reconnect, the wireless communication terminal restarts the PPP connection process.
Thus when the server transmits an RST packet during the TCP connection process, the wireless communication terminal requires an extremely long time to reconnect since it is performing a series of processes that includes disconnecting the TCP, disconnecting the PPP, displaying an error to the user, and restarting the PPP connection if the user issues a reconnection command.
In contrast for example, Patent Document 1 (Japanese Unexamined Patent Application, First Publication No. 2000-148619) discloses a technique applied in a data receiver which performs data communication via a wired LAN with a file transfer protocol (FTP) server connected to a network, in which, when the power of the data receiver is turned OFF while it is performing data communication with the FTP server and then turned ON again, the time taken in establishing communication connection with the FTP server is shortened.
When the power of the data receiver is turned OFF during data communication with the FTP server, the FTP server treats this as an error in the communication port number on the data receiver side. Consequently, when the data receiver performs a process of establishing communication connection with the FTP server after the power is turned ON again, since it is conventional to use the same communication port number as that used in the previous communication, the FTP server determines that there is an error in the communication port number on the data receiver side, and transmits an error message to the data receiver. When the data receiver receives the error message, it must set a new communication port number and restart a process of establishing communication connection with the FTP server. Consequently, it takes a long time to reconnect.
According to Patent Document 1, when the data receiver establishes communication connection with the FTP server after the power is turned ON again, it uses a different communication port number to that used in the previous communication. This prevents the communication port number on the data receiver side from being treated as an error by the FTP server, and enables a communication connection to be established speedily without interrupting the establishment process.
Patent Document 1 is admittedly effective when the power of the data receiver is turned ON/OFF during data communication by wired connection. However, in the abovementioned data communication between a server connected to a network and a wireless communication terminal, the server's determination of the communication port number on the wireless communication terminal side as an error or not keeps changing according to the wireless communication status (non-communicable or communicable) (Patent Document 1 focuses solely on error messages transmitted from the FTP server when the power is turned ON again). Therefore, Patent Document 1 cannot be applied in wireless data communication with a server.
Furthermore, when the server determines that there is an error in the communication port number on the wireless communication terminal side as described above, the wireless communication terminal requires a longer time to reconnect than in wired data communication since it performs the series of processes that includes disconnecting the TCP, disconnecting the PPP, displaying the error to the user, and restarting the PPP connection if the user issues a reconnection command. There is also a considerable load on the user, since he must determine whether to reconnect to the server and input a command indicating his decision.